<template>
	<view class="app-aboutus">
		<!-- <UniNavBar leftIcon="arrow-left" color="black" :title="title" @tapNavLeft="tapNavLeft"></UniNavBar> -->
<!-- 		<uni-nav-bar statusBar="true"
		:fixed="true" :border="false" 
		backgroundColor="#eff3f7">
			<view class="index-top-nav-title">
				<view class="leftIcon" @tap.stop="tapNavLeft">
					<uni-icon type="back" color="#333333" size="30"></uni-icon>
				</view>
				<view class="index-top-nav-title-content">
					{{title}}
				</view>
				<view class="rightIcon">
				</view>
			</view>
		</uni-nav-bar> -->
		
		<view class="content">
			<view class='title' v-if="title">{{getBulletin.title}}</view>
			<rich-text class="p" v-html="modifiedContent"></rich-text>
		</view>
	</view>
</template>

<script>
import {mapGetters} from 'vuex'
import {pageback, checkLogin} from '../../common/js/util.js'
import uniIcon from '../../components/uni-icon/uni-icon.vue';
import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue';
export default {
	data() {
		return {
			title: ''
		}
	},
	computed: {
		modifiedContent() {
			let str = this.getBulletin.content
			return str.replace(/(\<img|\<image)/ig, '<img style="max-width:100% !important;width: 98% !important;"')
		},
		...mapGetters([
			'getBulletin',
			'getLoginInfo',
			'getRequestUrl',
			'getLang'
		])
	},
	onShow() {
		uni.setNavigationBarTitle({
			title:this.getLang==1?'详情':'Details'
		})
		checkLogin(this.getLoginInfo, this.getRequestUrl)
	},
	methods: {
		tapNavLeft() {
			pageback();
		}
	},
	onLoad(e) {
		this.title = e.title;
	},
	components: {
		uniIcon,
		uniNavBar
	}
}
</script>

<style lang="scss">
@import '@/common/scss/global.scss';
@import '@/common/scss/variable.scss';
.app-aboutus {
	.index-top-nav-title{
		// padding-left: 30upx;
		width: 100%;
		font-size: 36upx;
		text-align: center;
		background: #FFFFFF;
		color: #333333;
		display: flex;
		align-items: center;
		justify-content: space-between;
		.leftIcon{
			width: 80upx;
		}
		.rightIcon{
			width: 80upx;
		}
		.index-top-nav-title-content{
			flex: 1;
		}
	}
	.content{
		margin: 30upx;
		.title{
			padding: 66upx 0 40upx 0;
			line-height: 1;
			font-size: 15px;
			font-weight: bold;
			text-align: center;
			color: $black;
		}
		.p{
			color: #999999;
			font-size: 14px;
			line-height: 22px;
			margin-bottom: 30upx;
			width: 750upx;
		}
	}
	image {
		width: 750upx !important;
	}
	img {
		width: 750upx !important;
	}
}
</style>
